package com.kit.data.kitopeso.fragment;

import android.content.Intent;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.viewbinding.ViewBinding;

import com.kit.data.kitopeso.activity.KitoCustomerServiceActivity;
import com.kit.data.kitopeso.activity.KitoFBOnlineActivity;
import com.kit.data.kitopeso.activity.KitoFBSubmitActivity;
import com.kit.data.kitopeso.base.BaseActivity;
import com.kit.data.kitopeso.base.BaseFragment;
import com.kit.data.kitopeso.databinding.KitoFbFragmentBinding;
import com.kit.data.kitopeso.net.PU;
import com.kit.data.kitopeso.tools.ViewUtils;

public class FbFragment extends BaseFragment<KitoFbFragmentBinding> {


    BaseActivity mActivity;

    @Override
    protected KitoFbFragmentBinding initViewBinding(LayoutInflater inflater, ViewGroup container) {
        return KitoFbFragmentBinding.inflate(inflater);
    }

    @Override
    protected void initView() {

        mActivity = (BaseActivity<ViewBinding>) getActivity();

        binding.getRoot().setPadding(0, 0, 0, 0);

        mActivity.setStatusBarHeight(binding.tvRoot);

        binding.tvCs.setOnClickListener(v -> {
            ViewUtils.viewScale(v);
            startActivity(new Intent(getActivity(), KitoCustomerServiceActivity.class));
        });
        binding.tvLayout1.setOnClickListener(v -> {
            ViewUtils.viewScale(v);
            PU.userBuriedPoint(PU.P199, "");
            Intent intent=new Intent(getActivity(), KitoFBSubmitActivity.class);
            startActivity(intent);
        });
        binding.tvLayout2.setOnClickListener(v -> {
            ViewUtils.viewScale(v);
            PU.userBuriedPoint(PU.P200, "");
            startActivity(new Intent(getActivity(), KitoFBOnlineActivity.class));
        });
    }

    @Override
    protected void initData() {
        UP_TYPE1 = PU.P197;
        UP_TYPE2 = PU.P198;
    }


}
